<?php $this->load->view('layout/header');?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <h3 class="page-title">旅游商品<small> 商品议价</small></h3>
            <?php echo breadcrumb(array('tourismgoods/grid'=>'旅游商品','商品议价')); ?>
        </div>
    </div>
    <?php echo execute_alert_message() ?>
    <div class="row-fluid">
        <div class="span12">
            
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-reorder"></i>列表</div>
                    <div class="tools">
                        <a class="collapse" href="javascript:;"></a>
                        <a class="remove" href="javascript:;"></a>
                    </div>
                </div>
                <div class="portlet-body flip-scroll">
                    <div class="dataTables_wrapper form-inline">
                        <div class="clearfix">
                            <a href="<?php echo base_url('tourismgoodsbargaining/add?goods_attr_id='.$this->input->get('goods_attr_id'));?>" class="add-button-link">
                                <div class="btn-group">
                                    <button class="btn green"><i class="icon-plus"></i> 添加</button>
                                </div>
                            </a>
                        </div>
                        <?php if ($all_rows > 0) :?>
                        <table class="table table-striped table-bordered table-hover" id="sample_1">
                            <thead class="flip-content">
                                <tr>
                                    <th width="15"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"></th>
                                    <th>分销商</th>
                            	    <th>供应商UID</th>	
                            	    <th>销售价</th>
                            	    <th>结算价</th>
                            	    <th>手续费</th>
                            	    <th>二级供应商ID</th>
                            	    <th>二级供应商手续费</th>
                            	    <th>银行手续费</th>
                            	    <th>结算方式</th>
                            	    <th>手续费付费者</th>
                            	    <th>创建时间</th>
                            	    <th>更新时间</th>
                            	    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($page_list->result() as $item) : ?>
                                <tr>
                                    <td><input type="checkbox" class="checkboxes" value="1" ></td>
                                    <td><?php echo $item->alias_name.'/'.$item->user_name.'/'.$item->seller_uid;?></td>
                                    <td><?php echo $item->provider_uid;?></td>
                                    <td><?php echo $item->shop_price;?></td>
                                    <td><?php echo $item->supply_price;?></td>
                                    <td><?php echo $item->poundage;?></td>
                                    <td><?php echo $item->prosecond_id;?></td>
                                    <td><?php echo $item->prosecond_profit;?></td>
                                    <td><?php echo $item->bankpay;?></td>
                                    <td><?php if($item->node==1){echo '系统结算'; }elseif ($item->node==2){echo '自主结算';}?></td>
                                    <td><?php if($item->payer==1){echo '分销商付手续费'; }elseif ($item->payer==2){echo '供应商';}elseif ($item->payer==3){echo '二级供应商';}?></td>
                                    <td><?php echo $item->created_at;?></td>
                                    <td><?php echo $item->updated_at;?></td>
                                    <td>
                                        <a class="btn mini green" href="<?php echo base_url('tourismgoodsbargaining/edit/'.$item->bargaining_id); ?>"><i class="icon-edit"></i> 编辑</a>
                                        <a class="btn mini green" href="<?php echo base_url('tourismgoodsbargaining/delete/'.$item->bargaining_id.'?goods_attr_id='.$item->goods_attr_id); ?>" onclick="return confirm('确定要删除？')"><i class="icon-trash"></i> 删除</a>
                                    </td>
                                </tr>
                                <?php endforeach;?>
                            </tbody>
                        </table>
                        <div class="row-fluid">
                            <div class="span6">
                                <div class="dataTables_info">
                                    <span>当前第</span><span style="color: red"><?php echo $pg_now?></span>页 
                                    <span>共</span><span style="color: red"><?php echo $all_rows?></span>条数据
                                    <span>每页显示20条 </span>
                                    <?php echo $pg_list ?>
                                </div>
                            </div>
                        </div>
                        <?php else: ?>
                            <div class="alert"><p>未找到数据。<p></div>
                        <?php endif ?>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>
